package com.lin.missyou.dto.validators;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
//关联类 注解的具体实现类
@Constraint(validatedBy = PasswordValidator.class)
public @interface PasswordEqual {
    int min() default 4;
    int max() default 6;


    String message() default  "passwords are not equal";

    //自定义校验注解模板方法
    Class<?>[] groups() default { };
    //自定义校验注解模板方法
	Class<? extends Payload>[] payload() default { };

}
